//
//  HomeLeaveDetail_center_Cell.m
//  ChatDemo-UI2.0
//
//  Created by syun on 16/8/16.
//  Copyright © 2016年 syun. All rights reserved.
//

static float leftLabelWidth = 80.00;

#import "HomeLeaveDetail_center_Cell.h"

@implementation HomeLeaveDetail_center_Cell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        UIView *superView = self.contentView;
        
        UIView *line=[[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREENWIDTH, 0.5)];
        line.backgroundColor=RGBACOLOR(199, 199, 204, 1);
        [superView addSubview:line];
        
        _applyParent = [[UILabel alloc] initWithFrame:CGRectMake(12, 12, leftLabelWidth, 15)];
        _applyParent.font = [UIFont systemFontOfSize:15];
        _applyParent.textColor=RGBACOLOR(151,151, 151, 1);
        _applyParent.textAlignment=NSTextAlignmentLeft;
        _applyParent.text=@"申请家长：";
        [superView addSubview:_applyParent];
        
        _applyParentCont = [[UILabel alloc] initWithFrame:CGRectMake(_applyParent.frame.origin.x+_applyParent.frame.size.width+10, 12, SCREENWIDTH-24-10-leftLabelWidth, 15)];
        _applyParentCont.font = [UIFont systemFontOfSize:15];
        _applyParentCont.textColor=RGBACOLOR(59,59, 59, 1);
        _applyParentCont.textAlignment=NSTextAlignmentLeft;
        [superView addSubview:_applyParentCont];
        
        _leaveType=[[UILabel alloc] initWithFrame:CGRectMake(12, _applyParent.frame.origin.y+_applyParent.frame.size.height+5, leftLabelWidth, 15)];
        _leaveType.font = [UIFont systemFontOfSize:15];
        _leaveType.textColor=RGBACOLOR(151,151, 151, 1);
        _leaveType.textAlignment=NSTextAlignmentLeft;
        _leaveType.text=@"请假类型：";
        [superView addSubview:_leaveType];
        
        _leaveTypeCont = [[UILabel alloc] initWithFrame:CGRectMake(_leaveType.frame.origin.x+_leaveType.frame.size.width+10, _leaveType.frame.origin.y, SCREENWIDTH-24-10-leftLabelWidth, 15)];
        _leaveTypeCont.font = [UIFont systemFontOfSize:15];
        _leaveTypeCont.textColor=RGBACOLOR(59,59, 59, 1);
        _leaveTypeCont.textAlignment=NSTextAlignmentLeft;
        [superView addSubview:_leaveTypeCont];
        
        _leaveTime=[[UILabel alloc] initWithFrame:CGRectMake(12, _leaveType.frame.origin.y+_leaveType.frame.size.height+5, leftLabelWidth, 15)];
        _leaveTime.font = [UIFont systemFontOfSize:15];
        _leaveTime.textColor=RGBACOLOR(151,151, 151, 1);
        _leaveTime.textAlignment=NSTextAlignmentLeft;
        _leaveTime.text=@"请假时间：";
        [superView addSubview:_leaveTime];
        
        _leaveTimeCont = [[UILabel alloc] initWithFrame:CGRectMake(_leaveTime.frame.origin.x+_leaveTime.frame.size.width+10, _leaveTime.frame.origin.y, SCREENWIDTH-24-10-leftLabelWidth, 15)];
        _leaveTimeCont.font = [UIFont systemFontOfSize:15];
        _leaveTimeCont.textColor=RGBACOLOR(59,59, 59, 1);
        _leaveTimeCont.textAlignment=NSTextAlignmentLeft;
        [superView addSubview:_leaveTimeCont];

        
        _leaveDays=[[UILabel alloc] initWithFrame:CGRectMake(12, _leaveTime.frame.origin.y+_leaveTime.frame.size.height+5, leftLabelWidth, 15)];
        _leaveDays.font = [UIFont systemFontOfSize:15];
        _leaveDays.textColor=RGBACOLOR(151,151, 151, 1);
        _leaveDays.textAlignment=NSTextAlignmentLeft;
        _leaveDays.text=@"请假天数：";
        [superView addSubview:_leaveDays];
        
        _leaveDaysCont = [[UILabel alloc] initWithFrame:CGRectMake(_leaveDays.frame.origin.x+_leaveDays.frame.size.width+10, _leaveDays.frame.origin.y, SCREENWIDTH-24-10-leftLabelWidth, 15)];
        _leaveDaysCont.font = [UIFont systemFontOfSize:15];
        _leaveDaysCont.textColor=RGBACOLOR(59,59, 59, 1);
        _leaveDaysCont.textAlignment=NSTextAlignmentLeft;
        [superView addSubview:_leaveDaysCont];
        
        _leaveReason=[[UILabel alloc] initWithFrame:CGRectMake(12, _leaveDays.frame.origin.y+_leaveDays.frame.size.height+5, leftLabelWidth, 15)];
        _leaveReason.font = [UIFont systemFontOfSize:15];
        _leaveReason.textColor=RGBACOLOR(151,151, 151, 1);
        _leaveReason.textAlignment=NSTextAlignmentLeft;
        _leaveReason.text=@"请假理由：";
        [superView addSubview:_leaveReason];
        
        _leaveReasonCont = [[UILabel alloc] initWithFrame:CGRectMake(_leaveReason.frame.origin.x+_leaveReason.frame.size.width+10, _leaveReason.frame.origin.y, SCREENWIDTH-24-10-leftLabelWidth,0)];
        _leaveReasonCont.font = [UIFont systemFontOfSize:15];
        _leaveReasonCont.textColor=RGBACOLOR(59,59, 59, 1);
        _leaveReasonCont.textAlignment=NSTextAlignmentLeft;
        _leaveReasonCont.numberOfLines=0;
        [superView addSubview:_leaveReasonCont];
        
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
